package com.ruoyi.event.domain.bo;

import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 帮扶成效业务对象 event_bf_result
 *
 * @author strongme
 * @date 2023-02-04
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class EventBfResultBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long bfResultId;

    /**
     * 被帮扶人员id
     */
    @NotNull(message = "被帮扶人员id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long userId;

    /**
     * 帮扶人员id
     */
    @NotNull(message = "帮扶人员id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long memberId;

    /**
     * 部门或单位
     */
    @NotBlank(message = "部门或单位不能为空", groups = {AddGroup.class, EditGroup.class})
    private String bmdw;

    /**
     * 月收入(rmb)
     */
    @NotNull(message = "月收入(rmb)不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long ysr;

    /**
     * 帮扶成效
     */
    @NotBlank(message = "帮扶成效不能为空", groups = {AddGroup.class, EditGroup.class})
    private String bfcs;

    public void setBfcsList(List<String> lists) {
        this.bfcs = StrUtil.join(",", lists);
    }

    /**
     * 图片
     */
    @NotBlank(message = "图片不能为空", groups = {AddGroup.class, EditGroup.class})
    private String img;

    /**
     * 备注
     */
    private String remark;


}
